<?php
/**
 * (commands) 解析-亚马逊物流管理库存(每日库存报表)(uk英国站点)
 */
namespace App\Console\Commands\SpApi\Report\Parse;

use App\Logic\Amazon\Api\ReportWork;
use App\Models\Basics\AmazonAccount;
use App\Models\Basics\SysCountry;
use Illuminate\Console\Command;
use SellingPartnerApi\ReportType;
class MYIInventoryUk extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'sp-report:get-parse-myi-inventory-uk';

    /**
     * The console command description.
     * @var string
     */
    protected $description = 'exe func';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        //UK账号
        $ukAccountIds = AmazonAccount::getCountryAccountIds(SysCountry::UK_COUNTRY_ID);
        if ($ukAccountIds) {
            $reportType = ReportType::GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA;
            ReportWork::getAndParseReportData($reportType, $ukAccountIds);
        }

        $this->info('finish!');
    }
}
